<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:a4j="http://richfaces.org/a4j">
  
<h:body>
	<h:form>
		<p:panel header="SEARCH FORM">
			<h:panelGrid columns="1" id="regGrid">
				<h:outputLabel for="city">inser the city that you want to see all availables packets:</h:outputLabel>
				<p:inputText id="city" value="#{VisualizationBean.city}" />
				<p:message for="city" />
				<p:commandButton value="Search!!" update="regGrid"	action="#{VisualizationBean.viualizePacketByCity()}" />
				
				
			</h:panelGrid>
		</p:panel>
		
			<h:dataTable value="#{VisualizationBean.packets}" var="item">
    				<h:column>#{item}</h:column>
				</h:dataTable>
		
		<h:outputLabel for="id">inser the id of the packet you want to see:</h:outputLabel>
				<p:inputText id="id" value="#{VisualizationBean.id2}" />
				<p:message for="id" />		
				
				<br />
				
				<p:commandButton value="Search!!" update="regGrid"	action="#{VisualizationBean.visalizeBasePacket()}" />
				
				<br /><br />
				
		<h:link outcome="/user/index" value="HomePage" /> <br />
		
	</h:form>
</h:body>
</html>